﻿'Copyright (C) 2010 Matthew Thompson (matt_b_thompson@hotmail.com - http://mcservertools.codeplex.com)

'This program is free software; you can redistribute it and/or
'modify it under the terms of the GNU General Public License
'as published by the Free Software Foundation; either version 2
'of the License, or (at your option) any later version.

'This program is distributed in the hope that it will be useful,
'but WITHOUT ANY WARRANTY; without even the implied warranty of
'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'GNU General Public License for more details.

'You should have received a copy of the GNU General Public License
'along with this program; if not, write to the Free Software
'Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.


Imports System.IO

Public Class frmMain

    Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Dim objFolderCreate As documentParser = New documentParser
        Dim objFileCreate As documentParser = New documentParser
        Dim objXmlParser As documentParser = New documentParser

        If Not File.Exists("config/config.xml") Then

            'If file and folder don't exist, create them
            objFolderCreate.folderCreation("config")
            objFileCreate.fileCreation("config/config.xml")
            frmConfig.Show()

        Else
            'Read settings
            objXmlParser.xmlReadConfig("config/config.xml")
        End If





    End Sub

    Private Sub mnuFileConfig_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuFileConfig.Click
        frmConfig.Show()

    End Sub
End Class
